package com.health.medicine.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 药品生产厂家信息表
 * @TableName manufacturer
 */
@TableName(value ="manufacturer")
@Data
public class Manufacturer implements Serializable {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 企业名称
     */
    private String name;

    /**
     * 账号
     */
    private String account;

    /**
     * 许可证编号
     */

    private String licenseNumber;

    /**
     * 企业所在省份
     */
    private String province;

    /**
     * 社会信用代码
     */
    private String socialCreditCode;

    /**
     * 分类代码
     */
    private String classificationCode;

    /**
     * 注册地址
     */
    private String registeredAddress;

    /**
     * 法定代表人
     */
    private String legalRepresentative;

    /**
     * 企业负责人
     */
    private String companyLeader;

    /**
     * 监督机构
     */
    private String supervisionAgency;

    /**
     * 投诉举报电话
     */
    private String complaintPhone;

    /**
     * 发证机关
     */
    private String issuingAuthority;

    /**
     * 签发人
     */
    private String signatory;

    /**
     * 有效期至
     */
    private Date validUntil;

    /**
     * 许可证状态 0-正常 ，1-正常
     */
    private Integer licenseStatus;

    /**
     * 签发日期
     */
    private Date issueTime;

    /**
     * 联系地址
     */
    private String contactLocation;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 是否删除 0-未删除 1-删除
     */
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Manufacturer other = (Manufacturer) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getLicenseNumber() == null ? other.getLicenseNumber() == null : this.getLicenseNumber().equals(other.getLicenseNumber()))
            && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
            && (this.getSocialCreditCode() == null ? other.getSocialCreditCode() == null : this.getSocialCreditCode().equals(other.getSocialCreditCode()))
            && (this.getClassificationCode() == null ? other.getClassificationCode() == null : this.getClassificationCode().equals(other.getClassificationCode()))
            && (this.getRegisteredAddress() == null ? other.getRegisteredAddress() == null : this.getRegisteredAddress().equals(other.getRegisteredAddress()))
            && (this.getLegalRepresentative() == null ? other.getLegalRepresentative() == null : this.getLegalRepresentative().equals(other.getLegalRepresentative()))
            && (this.getCompanyLeader() == null ? other.getCompanyLeader() == null : this.getCompanyLeader().equals(other.getCompanyLeader()))
            && (this.getSupervisionAgency() == null ? other.getSupervisionAgency() == null : this.getSupervisionAgency().equals(other.getSupervisionAgency()))
            && (this.getComplaintPhone() == null ? other.getComplaintPhone() == null : this.getComplaintPhone().equals(other.getComplaintPhone()))
            && (this.getIssuingAuthority() == null ? other.getIssuingAuthority() == null : this.getIssuingAuthority().equals(other.getIssuingAuthority()))
            && (this.getSignatory() == null ? other.getSignatory() == null : this.getSignatory().equals(other.getSignatory()))
            && (this.getValidUntil() == null ? other.getValidUntil() == null : this.getValidUntil().equals(other.getValidUntil()))
            && (this.getLicenseStatus() == null ? other.getLicenseStatus() == null : this.getLicenseStatus().equals(other.getLicenseStatus()))
            && (this.getIssueTime() == null ? other.getIssueTime() == null : this.getIssueTime().equals(other.getIssueTime()))
            && (this.getContactLocation() == null ? other.getContactLocation() == null : this.getContactLocation().equals(other.getContactLocation()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getLicenseNumber() == null) ? 0 : getLicenseNumber().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getSocialCreditCode() == null) ? 0 : getSocialCreditCode().hashCode());
        result = prime * result + ((getClassificationCode() == null) ? 0 : getClassificationCode().hashCode());
        result = prime * result + ((getRegisteredAddress() == null) ? 0 : getRegisteredAddress().hashCode());
        result = prime * result + ((getLegalRepresentative() == null) ? 0 : getLegalRepresentative().hashCode());
        result = prime * result + ((getCompanyLeader() == null) ? 0 : getCompanyLeader().hashCode());
        result = prime * result + ((getSupervisionAgency() == null) ? 0 : getSupervisionAgency().hashCode());
        result = prime * result + ((getComplaintPhone() == null) ? 0 : getComplaintPhone().hashCode());
        result = prime * result + ((getIssuingAuthority() == null) ? 0 : getIssuingAuthority().hashCode());
        result = prime * result + ((getSignatory() == null) ? 0 : getSignatory().hashCode());
        result = prime * result + ((getValidUntil() == null) ? 0 : getValidUntil().hashCode());
        result = prime * result + ((getLicenseStatus() == null) ? 0 : getLicenseStatus().hashCode());
        result = prime * result + ((getIssueTime() == null) ? 0 : getIssueTime().hashCode());
        result = prime * result + ((getContactLocation() == null) ? 0 : getContactLocation().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", account=").append(account);
        sb.append(", licenseNumber=").append(licenseNumber);
        sb.append(", province=").append(province);
        sb.append(", socialCreditCode=").append(socialCreditCode);
        sb.append(", classificationCode=").append(classificationCode);
        sb.append(", registeredAddress=").append(registeredAddress);
        sb.append(", legalRepresentative=").append(legalRepresentative);
        sb.append(", companyLeader=").append(companyLeader);
        sb.append(", supervisionAgency=").append(supervisionAgency);
        sb.append(", complaintPhone=").append(complaintPhone);
        sb.append(", issuingAuthority=").append(issuingAuthority);
        sb.append(", signatory=").append(signatory);
        sb.append(", validUntil=").append(validUntil);
        sb.append(", licenseStatus=").append(licenseStatus);
        sb.append(", issueTime=").append(issueTime);
        sb.append(", contactLocation=").append(contactLocation);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}